import {BaseService} from "./base.service";
import {Http} from "@angular/http";
import {Injectable} from "@angular/core";
import 'rxjs/add/operator/map';
@Injectable()
export class SearchService extends BaseService {
  constructor(public http: Http) {
    super(http);
  }

  public getMovieHome() {
    let url = 'movie/search/movie/home/';
    return super.post(url, {});
  }

  // public getTianQis() {
  //   let url = 'server/Home/Area/getProvinces';//省json
  //   // let url = 'movie/search/movie/home/';
  //   return super.get(url,{});
  // }

  public getWar(tpyes) {
    let url = '?type='+tpyes+'&key=ce1c6aec0dd22f96062f69d18e12dcb7';//新闻json
    return super.get(url,{});
  }

  public getXwList(id){
    let url = id;
    return super.getList(url,{});
  }


  public getMovieDetail(href) {
    let url = 'movie/search/movie/detail/';
    return super.post(url, {href: href});
  }

  public searchHDetails(data) {
    let url = 'h/details/';
    return super.post(url, data);
  }

}
